{% extends "main/index.html" %}

{% block title %}Register{% endblock %}

{% block content %}

  {% if form.errors %}
  <p class="errors">Please correct the errors below: {{ form.non_field_errors }}</p>
  {% endif %}
<div >
  <h1 class="user">Create an account</h1>
  <p>
                Fill in the forms below and press register. It is completely free to register!

  </p>
  
  <div id="register-form">
  <form method="post" action="" class="wide">{% csrf_token %}
    <p>
      <label for="id_username">Username:</label>
      {% if form.username.errors %}
        <p class="errors">{{ form.username.errors.as_text }}</p>
      {% endif %}
      {{ form.username }}
    </p>
    <p>
      <label for="id_email" >Email address:</label>
      {% if form.email.errors %}
        <p class="errors">{{ form.email.errors.as_text }}</p>
      {% endif %}
      {{ form.email }}
    </p>
    <p>
      <label for="id_password1">Password:</label>
      {% if form.password1.errors %}
        <p class="errors">{{ form.password1.errors.as_text }}</p>
      {% endif %}
      {{ form.password1 }}
    </p>
    <p>
      <label for="id_password2">Password (type again to catch typos):</label>
      {% if form.password2.errors %}
        <p class="errors">{{ form.password2.errors.as_text }}</p>
      {% endif %}
      {{ form.password2 }}
    </p>
    <p class="submit"><input type="submit" value="Register &rarr;"></p>
  </form>
  </div>
  </div>
  
{% endblock %}

